package tech.aistar.service.impl;

import org.apache.ibatis.session.SqlSession;
import tech.aistar.mapper.PhoneTypeMapper;
import tech.aistar.pojo.PhoneType;
import tech.aistar.service.IPhoneTypeService;
import tech.aistar.until.MybatisUtil;

import java.util.List;

/**
 * @author Ray
 * @version 1.0
 * @description:本类用来演示:
 * @date 2019/9/5  20:41
 */
public class PhoneTypeServiceImpl implements IPhoneTypeService {

    @Override
    public List<PhoneType> findAll() {
        SqlSession sqlSession = MybatisUtil.getSqlSession();
        PhoneTypeMapper mapper = sqlSession.getMapper(PhoneTypeMapper.class);

        List<PhoneType> list = mapper.findAll();

        sqlSession.close();
        return list;
    }
}
